package com.blrs.service.enterprise.electric.impl;

import java.sql.Timestamp;
import java.util.*;

import com.blrs.VO.ClassVO;
import com.blrs.common.core.domain.AjaxResult;
import com.blrs.common.core.domain.TreeSelect;
import com.blrs.common.core.domain.entity.SysDictType;
import com.blrs.common.core.domain.entity.SysUser;
import com.blrs.common.utils.ReflectionUtils;
import com.blrs.common.utils.SecurityUtils;
import com.blrs.common.utils.StringUtils;
import com.blrs.domain.*;
import com.blrs.mapper.*;
import com.blrs.service.enterprise.electric.IElectricSalesInfoService;
import com.blrs.system.mapper.SysDeptDictDataMapper;
import com.blrs.system.mapper.SysDictTypeMapper;
import com.blrs.system.mapper.SysUploadFileMapper;
import com.blrs.system.mapper.SysUserMapper;
import com.blrs.system.service.ISysDeptService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 电销管理信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-11
 */
@Service
public class ElectricSalesInfoServiceImpl implements IElectricSalesInfoService
{
    @Autowired
    private ElectricSalesInfoMapper electricSalesInfoMapper;
    @Autowired
    private SysDeptDictDataMapper sysDeptDictDataMapper;
    @Autowired
    private SysDictTypeMapper sysDictTypeMapper;
    @Autowired
    private HighSeasMapper highSeasMapper;
    @Autowired
    private SysUserMapper userMapper;
    @Autowired
    private HighSeaRecordMapper electricSalesFollowRecordsMapper;
    @Autowired
    private SysAreaMapper sysAreaMapper;
    @Autowired
    private SysUploadFileMapper sysUploadFileMapper;
    @Autowired
    private EnterprisePersonInfoMapper enterprisePersonInfoMapper;
    @Autowired
    private EnterpriseInfoMapper enterpriseInfoMapper;
    @Autowired
    private ISysDeptService sysDeptService;
    @Autowired
    private DimIndustryMapper dimIndustryMapper;

    /**
     * 查询电销管理信息
     * 
     * @param electricId 电销管理信息主键
     * @return 电销管理信息
     */
    @Override
    public ElectricSalesInfo selectElectricSalesInfoByElectricId(String electricId)
    {
        //这里需要对应的电销记录表list集合
        ElectricSalesFollowRecords electricSalesFollowRecords = new ElectricSalesFollowRecords();
        electricSalesFollowRecords.setElectricId(electricId);
        ElectricSalesInfo electricSalesInfo = electricSalesInfoMapper.selectElectricSalesInfoByElectricId(electricId);
        if(electricSalesInfo!=null){
            electricSalesInfo.setUserName(userMapper.selectUserById(electricSalesInfo.getCreateId()).getUserName());
            if (Objects.nonNull(electricSalesInfo.getAdministrativeArea())){
                electricSalesInfo.setAreaName(sysAreaMapper.selectSysAreaByAreaId(electricSalesInfo.getAdministrativeArea()).getAreaName());
            }
            if (Objects.nonNull(electricSalesInfo.getAdministrativeArea())){
                electricSalesInfo.setAreaName(sysAreaMapper.selectSysAreaByAreaId(electricSalesInfo.getAdministrativeArea()).getAreaName());
            }

            if (Objects.nonNull(electricSalesInfo.getDevelopmentId())){
                electricSalesInfo.setDevelopManager(userMapper.selectUserById(electricSalesInfo.getDevelopmentId()).getNickName());
            }
            if (Objects.nonNull(electricSalesInfo.getTransactionId())){
                electricSalesInfo.setBusinessManager(userMapper.selectUserById(electricSalesInfo.getTransactionId()).getNickName());
            }
            electricSalesInfo.setUrl(sysUploadFileMapper.selectUrlByCode("seas", electricSalesInfo.getBusinessLicense()));
            String lastRecord=electricSalesFollowRecordsMapper.selectHighSeaLastRocord(electricSalesInfo.getElectricId());
            if (StringUtils.isNotEmpty(lastRecord)){
                electricSalesInfo.setLastRecord(lastRecord);
            }
        }
        return electricSalesInfo;
    }



    /**
     * 查询电销管理信息列表
     * 
     * @param electricSalesInfo 电销管理信息
     * @return 电销管理信息
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<ElectricSalesInfo> selectElectricSalesInfoList(ElectricSalesInfo electricSalesInfo)
    {

        SysUser sysUser = userMapper.selectUserById(SecurityUtils.getUserId());
        //获取当前用户的用户id
        electricSalesInfo.setOrganizationId(SecurityUtils.getOrgId());
        if(electricSalesInfo.getReceiveId()==null){
            if (SecurityUtils.getUserId()!=1&&SecurityUtils.getUserId()!=2&&sysUser.getIsAdmin().equals("1")){
                //说明是管理员，可以查看所有数据
                electricSalesInfo.setReceiveId(null);
                electricSalesInfo.setDevelopmentId(null);
//           electricSalesInfo.setReceiveId(String.valueOf(SecurityUtils.getUserId()));
//           electricSalesInfo.setTransactionId(SecurityUtils.getUserId());
            }else{
                electricSalesInfo.setDevelopmentId(SecurityUtils.getUserId());
                electricSalesInfo.setReceiveId(String.valueOf(SecurityUtils.getUserId()));
            }
        }
        List<ElectricSalesInfo> electricSalesInfos = electricSalesInfoMapper.selectElectricSalesInfoList(electricSalesInfo);
        for (ElectricSalesInfo salesInfo : electricSalesInfos) {
            salesInfo.setUserName(userMapper.selectUserById(salesInfo.getCreateId()).getUserName());
            if (Objects.nonNull(salesInfo.getAdministrativeArea())){
                System.out.println(salesInfo.getAdministrativeArea());
                salesInfo.setAreaName(sysAreaMapper.selectSysAreaByAreaId(salesInfo.getAdministrativeArea()).getAreaName());
            }
            if (Objects.nonNull(salesInfo.getIndustry())){
                salesInfo.setIndustry(dimIndustryMapper.selectIndustryByIndustryId(salesInfo.getIndustry()));
            }
          if (Objects.nonNull(salesInfo.getDevelopmentId())){
              salesInfo.setDevelopManager(userMapper.selectUserById(salesInfo.getDevelopmentId()).getUserName());
          }
          if (Objects.nonNull(salesInfo.getTransactionId())){
              salesInfo.setBusinessManager(userMapper.selectUserById(salesInfo.getTransactionId()).getUserName());
          }
            //最新进展操作以及最新操作时间
            if(!StringUtils.isEmpty(salesInfo.getBusinessType())){
                if(salesInfo.getBusinessType().equals("1")){
                    if(!salesInfo.getTitle().equals("电销管理信息")){
                        if (salesInfo.getTitle().equals("公海记录进展")){
                            salesInfo.setLastRecord("新增跟进记录");
                        }else {
                            salesInfo.setLastRecord("新增"+salesInfo.getTitle());
                        }
                    }else{
                        salesInfo.setFollowTime(salesInfo.getOperateTime());
                    }
                }else if(salesInfo.getBusinessType().equals("2")){
                    if(!salesInfo.getTitle().equals("电销管理信息")){
                        if (salesInfo.getTitle().equals("公海记录进展")){
                            salesInfo.setLastRecord("更新跟进记录");
                        }else {
                            salesInfo.setLastRecord("更新"+salesInfo.getTitle());
                        }
                    }else{
                        salesInfo.setLastRecord("更新电销信息");
                    }
                }
            }
//            String lastRecord=electricSalesFollowRecordsMapper.selectHighSeaLastRocord(salesInfo.getElectricId());
//          if (StringUtils.isNotEmpty(lastRecord)){
//              salesInfo.setLastRecord(lastRecord);
//          }

            salesInfo.setUrl(sysUploadFileMapper.selectUrlByCode("seas", salesInfo.getBusinessLicense()));
//            salesInfo.setCompanyNo("GH"+salesInfo.getCompanyNo());
        }
        return electricSalesInfos;
    }

    @Override
    public List<ElectricSalesInfo> selectElectricSalesInfoListByIndex(ElectricSalesInfo electricSalesInfo) {
        //获取当前用户的用户id
        if (SecurityUtils.getUserId()!=1&&SecurityUtils.getUserId()!=2){
            electricSalesInfo.setReceiveId(String.valueOf(SecurityUtils.getUserId()));
            electricSalesInfo.setTransactionId(SecurityUtils.getUserId());
        }
        List<ElectricSalesInfo> electricSalesInfos = electricSalesInfoMapper.selectElectricSalesInfoListByIndex(electricSalesInfo);
        for (ElectricSalesInfo salesInfo : electricSalesInfos) {
            //最新进展操作以及最新操作时间
            if(!StringUtils.isEmpty(salesInfo.getBusinessType())){
                if(salesInfo.getBusinessType().equals("1")){
                    if(!salesInfo.getTitle().equals("电销管理信息")){
                        if (salesInfo.getTitle().equals("公海记录进展")){
                            salesInfo.setLastRecord("新增跟进记录");
                        }else {
                            salesInfo.setLastRecord("新增"+salesInfo.getTitle());
                        }
                    }else{
                        salesInfo.setFollowTime(salesInfo.getOperateTime());
                    }
                }else if(salesInfo.getBusinessType().equals("2")){
                    if(!salesInfo.getTitle().equals("电销管理信息")){
                        if (salesInfo.getTitle().equals("公海记录进展")){
                            salesInfo.setLastRecord("更新跟进记录");
                        }else {
                            salesInfo.setLastRecord("更新"+salesInfo.getTitle());
                        }
                    }else{
                        salesInfo.setLastRecord("更新电销信息");
                    }
                }
            }
            salesInfo.setCompanyNo("GH"+salesInfo.getCompanyNo());
        }
        return electricSalesInfos;
    }

    @Override
    public List<SysUser> selectElectricSalesPersonList() {
     return userMapper.selectElectricSalesPersonList(SecurityUtils.getOrgId());
    }

    @Override
    public List<ElectricSalesInfo> selectElectricSalesInfoListByPerson(ElectricSalesInfo electricSalesInfo) {
        electricSalesInfo.setOrganizationId(SecurityUtils.getOrgId());
        return  electricSalesInfoMapper.selectElectricSalesInfoList(electricSalesInfo);
    }


    /**
     * 新增电销管理信息
     * @param electricSalesInfo 电销管理信息
     * @return 结果
     */
    @Override
    public int insertElectricSalesInfo(ElectricSalesInfo electricSalesInfo) throws NoSuchFieldException, IllegalAccessException {
        //先判断电销是否重复
        int i = electricSalesInfoMapper.selectEleByNameAndOrgId(electricSalesInfo.getEnterpriseName(), SecurityUtils.getOrgId());
        if (i>0){
            throw new RuntimeException("企业名称重复,当前账号归属企业账号已经存在该线索数据!");
        }
        //判断公海是否存在相同企业数据
        int i1 = highSeasMapper.selectHigSeasByOrgName(electricSalesInfo.getEnterpriseName(), SecurityUtils.getOrgId());
        if (i1>0){
            throw new RuntimeException("企业名称重复,公海已经存在该相同企业数据!");
        }
        //判断客户是否存在相同企业数据
        int i2 = enterpriseInfoMapper.selectInfoByOrgName(electricSalesInfo.getEnterpriseName(), SecurityUtils.getOrgId());
        if (i2>0){
            throw new RuntimeException("企业名称重复,客户管理已经存在该相同企业数据!");
        }
        ReflectionUtils.setCommonPrivateProperty(electricSalesInfo);
        electricSalesInfo.setMarkAs("1");
        electricSalesInfo.setElectricId(UUID.randomUUID().toString().replaceAll("-", ""));
        electricSalesInfo.setReceiveId(String.valueOf(SecurityUtils.getUserId()));
        return electricSalesInfoMapper.insertElectricSalesInfo(electricSalesInfo);
    }

    /**
     * 修改电销管理信息
     *
     * @param electricSalesInfo 电销管理信息
     * @return 结果
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult updateElectricSalesInfo(ElectricSalesInfo electricSalesInfo) throws NoSuchFieldException, IllegalAccessException {
        //修改判断重复(公海)
        HighSeas seas = highSeasMapper.selectEnterpriseInfoByNameInfo(electricSalesInfo.getEnterpriseName(), SecurityUtils.getOrgId());
        //客户
        EnterpriseInfo enterpriseInfo =enterpriseInfoMapper.selectEnterpriseInfoNameAndOrgId(electricSalesInfo.getEnterpriseName(),SecurityUtils.getOrgId());
        if (Objects.nonNull(seas)){
            if (!seas.getEnterpriseId().equals(electricSalesInfo.getElectricId())){
                //说明数据库有一条名称一样的记录，并且不是自身
                return AjaxResult.error("不能修改公海/电销重复数据");
            }
        }
        if (Objects.nonNull(enterpriseInfo)){
            return AjaxResult.error("不能修改成客户管理重复数据");
        }
        electricSalesInfo.setOperateTime(new Timestamp(new Date().getTime()));
        if(Objects.nonNull(electricSalesInfo.getTransactionId())){
            electricSalesInfo.setReceiveId(electricSalesInfo.getTransactionId().toString());
        }
       electricSalesInfoMapper.updateElectricSalesInfo(electricSalesInfo);
        //修改电销的同时，记得也要修改原公海信息
        HighSeas highSeas = new HighSeas();
        BeanUtils.copyProperties(electricSalesInfo,highSeas,new String[]{"classification_id"});
        //手动注入的参数
        highSeas.setBusinessManager(electricSalesInfo.getTransactionId());
        highSeas.setDevelopManager(electricSalesInfo.getDevelopmentId());
        highSeas.setRegisteredCapital(electricSalesInfo.getRegisteredCapital());
        highSeas.setOperateTime(new Date());
        highSeas.setEnterpriseId(electricSalesInfo.getElectricId());
        highSeas.setOperateTime(new Timestamp(new Date().getTime()));
        highSeas.setIsOut("1");//这时候肯定还是1，别把它转成0了
        int i = highSeasMapper.updateHighSeas(highSeas);
        //同时，如果修改了联系人，也需要同步到公司的人员信息中
        //添加或修改人员信息
        //判断人员管理中存在该电话
        EnterprisePersonInfo info = new EnterprisePersonInfo();
        info.setPhone(highSeas.getTelephone());
        info.setEnterpriseName(highSeas.getEnterpriseName());
        info.setOrganizationId(SecurityUtils.getOrgId());
        List<EnterprisePersonInfo> personInfoList = enterprisePersonInfoMapper.selectEnterprisePersonInfoListByPhone(info);
        if (StringUtils.isNotEmpty(personInfoList)){
            //修改
            info.setName(electricSalesInfo.getContacts());
            info.setEnterpriseId(electricSalesInfo.getElectricId());
            info.setEnterpriseName(electricSalesInfo.getEnterpriseName());
            info.setOrganizationId(SecurityUtils.getOrgId());
            info.setOrganizationName(SecurityUtils.getOrgName());
            info.setOperateTime(new Timestamp(new Date().getTime()));
            info.setId(personInfoList.get(0).getId());
            enterprisePersonInfoMapper.updateEnterprisePersonInfo(info);
        }else {
            EnterprisePersonInfo enterprisePersonInfo = new EnterprisePersonInfo();
            //新增
            enterprisePersonInfo.setId(UUID.randomUUID().toString());
            enterprisePersonInfo.setPhone(electricSalesInfo.getTelephone());
            enterprisePersonInfo.setName(electricSalesInfo.getContacts());
            enterprisePersonInfo.setEnterpriseId(electricSalesInfo.getElectricId());
            enterprisePersonInfo.setEnterpriseName(electricSalesInfo.getEnterpriseName());
            enterprisePersonInfo.setCreateId(SecurityUtils.getUserId());
            enterprisePersonInfo.setOrganizationId(SecurityUtils.getOrgId());
            enterprisePersonInfo.setOrganizationName(SecurityUtils.getOrgName());
            enterprisePersonInfo.setClassificationId("650c44e1-b575-4b62-9d54-1ba9d1e8abb7");
            enterprisePersonInfo.setFilingTime(new Timestamp(new Date().getTime()));
            enterprisePersonInfo.setCreationTime(new Timestamp(new Date().getTime()));
            enterprisePersonInfo.setOperateTime(new Timestamp(new Date().getTime()));
            enterprisePersonInfoMapper.insertEnterprisePersonInfo(enterprisePersonInfo);
        }
        return AjaxResult.success(i);
    }

    /**
     * 批量删除电销管理信息
     * 
     * @param electricIds 需要删除的电销管理信息主键
     * @return 结果
     */
    @Override
    public int deleteElectricSalesInfoByElectricIds(String[] electricIds)
    {
        return electricSalesInfoMapper.deleteElectricSalesInfoByElectricIds(electricIds);
    }

    /**
     * 删除电销管理信息信息
     * 
     * @param electricId 电销管理信息主键
     * @return 结果
     */
    @Override
    public int deleteElectricSalesInfoByElectricId(String electricId)
    {
        return electricSalesInfoMapper.deleteElectricSalesInfoByElectricId(electricId);
    }

    /**
     * 电销类型
     * @return
     */
    @Override
    public TreeSelect selectElectricType() {
        //定义魔法值（不建议）
        SysDictType telesalesType = sysDictTypeMapper.selectDictTypeByType("telesales_type");
       List<Map<Object, String>>  list = sysDeptDictDataMapper.selectByType("telesales_type");
        TreeSelect  root= new TreeSelect();
        root.setId(0L);
        root.setLabel(telesalesType.getDictName());
         //把map集合转成TreeSelect集合
        List<TreeSelect> treeSelectList = new ArrayList<>();
        for (Map<Object, String> map : list) {
            TreeSelect treeSelect = new TreeSelect();
            // 获取id和label字段的值
            Long id = Long.valueOf(map.get("value"));
            String label = map.get("key");
            treeSelect.setId(id);
            treeSelect.setLabel(label);
            treeSelect.setChildren(Collections.emptyList());
            treeSelectList.add(treeSelect);
        }
        //把子节点添加进去
        root.setChildren(treeSelectList);
        return root;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public AjaxResult convertElectric(String[] highSeas, String deptId) throws NoSuchFieldException, IllegalAccessException {
   //先查询是否存在这个用户
        SysUser sysUser = userMapper.selectUserById(Long.valueOf(deptId));
        if (Objects.nonNull(sysUser)){
                   //根据id查询指定的公海数据
          List<HighSeas> list=highSeasMapper.selectHighSeasByIds(highSeas);
        for (HighSeas seas : list) {
            //拷贝
            ElectricSalesInfo electricSalesInfo = new ElectricSalesInfo();
            BeanUtils.copyProperties(seas,electricSalesInfo);
            //有些字段不统一，需要手动注入
            electricSalesInfo.setDevelopmentId(Long.valueOf(deptId));
            electricSalesInfo.setDevelopManager(sysUser.getNickName());
            electricSalesInfo.setDevelopmentId(seas.getDevelopManager());
            electricSalesInfo.setFollowTime(new Timestamp(new Date().getTime()));
//            ReflectionUtils.setCommonPrivateProperty(electricSalesInfo);
            //新增
            //添加对应的用户id
            electricSalesInfo.setReceiveId(deptId);
            //添加主键(这个地方不能自定义主键，只能取原来的主键 因为公海表删除后，没有企业id关联电销表 无法获取荣誉证书和企业人员和电销的关联)
            electricSalesInfo.setElectricId(seas.getEnterpriseId());
            electricSalesInfo.setRegisteredCapital(seas.getRegisteredCapital());
            //增加操作时间
            electricSalesInfo.setOperateTime(new Timestamp(new Date().getTime()));
            //公海主分类和电销主分类不是同一分类,所以在转电销的时候，需要把数据直接放在主分类下
            electricSalesInfo.setClassificationId("650c44e1-b575-4b62-9d54-1ba9d1e8abb7");
             electricSalesInfoMapper.insertElectricSalesInfo(electricSalesInfo);
            //删除公海数据(逻辑删除，并且保证该数据被逻辑删除后，仍然不能添加一样的客户数据)
            highSeasMapper.deleteHighSeasByEnterpriseId(seas.getEnterpriseId());
        }
        return AjaxResult.success();
        }
        return AjaxResult.error();
    }

    @Override
    public void updateClassIds(String[] enterIds, String classId) {
        electricSalesInfoMapper.updateElectricClassId(enterIds,classId);
    }

    @Override
    public int editBusinessManager(ClassVO classVO) {
        return electricSalesInfoMapper.updateBusinessManager(classVO);
    }

    @Transactional(rollbackFor = Exception.class)
    @Override
    public int returnEle(String id) {
        //删除电销信息
        //回复原先的公海信息
        int i = highSeasMapper.updateHighSeasIsOut(id);
        if (i==0){
            //说明没有找到对应的公海信息，说明数据是在电销里面新增的,直接在公海中进行新增即可。
            ElectricSalesInfo electricSalesInfo = electricSalesInfoMapper.selectElectricSalesInfoByElectricId(id);
            HighSeas highSeas = new HighSeas();
            highSeas.setEnterpriseId(id);
            highSeas.setEnterpriseName(electricSalesInfo.getEnterpriseName());
            highSeas.setEnterpriseSource(electricSalesInfo.getEnterpriseSource());
            highSeas.setAdministrativeArea(electricSalesInfo.getAdministrativeArea());
            highSeas.setLegalRepresentative(electricSalesInfo.getLegalRepresentative());
            highSeas.setEstablishmentDate(electricSalesInfo.getEstablishmentDate());
            highSeas.setRegisteredCapital(electricSalesInfo.getRegisteredCapital());
            highSeas.setIndustry(electricSalesInfo.getIndustry());
            highSeas.setContacts(electricSalesInfo.getContacts());
            highSeas.setTelephone(electricSalesInfo.getTelephone());
            highSeas.setEnterpriseAddress(electricSalesInfo.getEnterpriseAddress());
            highSeas.setBusinessScope(electricSalesInfo.getBusinessScope());
            highSeas.setEnterpriseNature(electricSalesInfo.getEnterpriseNature());
            highSeas.setCreationTime(electricSalesInfo.getCreationTime());
            highSeas.setOperateTime(electricSalesInfo.getOperateTime());
            highSeas.setOrganizationId(SecurityUtils.getOrgId());
            highSeas.setOrganizationName(SecurityUtils.getOrgName());
            highSeas.setDelFlag(0);
            highSeas.setAddress(electricSalesInfo.getEnterpriseAddress());
            highSeas.setBelongTo(SecurityUtils.getOrgId());
            highSeas.setIsOut("0");
            highSeas.setTaxId(electricSalesInfo.getTaxId());
            highSeas.setDevelopManager(electricSalesInfo.getDevelopmentId());
            highSeas.setBusinessManager(electricSalesInfo.getTransactionId());
            highSeas.setStatus("0");
            highSeas.setCreateId(SecurityUtils.getUserId());
            highSeas.setBusinessLicense(electricSalesInfo.getBusinessLicense());
            highSeasMapper.insertHighSeas(highSeas);

        }
        return    electricSalesInfoMapper.deleteElectricSalesInfoByElectricId(id);
    }


    //传入一个电销id，根据电销id获取电销对象，转成商机对象返给商机添加页面
    @Override
    public AjaxResult convertBusinessInfo(String electricId) {
        ElectricSalesInfo electricSalesInfo = electricSalesInfoMapper.selectElectricSalesInfoByElectricId(electricId);
        BusinessOpportunityInformation businessOpportunityInformation = new BusinessOpportunityInformation();
        BeanUtils.copyProperties(electricSalesInfo,businessOpportunityInformation);
        //一些不匹配的字段最好手动注入
        businessOpportunityInformation.setClassificationId("650c44e1-b575-4b62-9d54-1ba9d1e8abb7");
         businessOpportunityInformation.setPosition(electricSalesInfo.getContacts());
         businessOpportunityInformation.setEnterpriseId(electricSalesInfo.getElectricId());
         businessOpportunityInformation.setEnterpriseName(electricSalesInfo.getEnterpriseName());
         businessOpportunityInformation.setDevelopmentManager(electricSalesInfo.getDevelopManager());
         businessOpportunityInformation.setDevelopmentId(electricSalesInfo.getDevelopmentId());
         businessOpportunityInformation.setBusinessManager(electricSalesInfo.getBusinessManager());
         businessOpportunityInformation.setTransactionId(electricSalesInfo.getTransactionId());
         return AjaxResult.success(businessOpportunityInformation);
    }

}
